(function() {
	document.createElement('ag-Datebox');
}).call(this);
// 日期选择控件
(function(window, angular, undefined){
	angular.module('ui.datebox', [])
	.directive('agDatebox', ["$rootScope", function($rootScope) {
		return {
			replace : true,
			restrict : 'E',
			scope :{
        		showcurday:'='
            },
			template : "<input></input>",
			require : "ngModel",
			link : function(scope, element, attrs, ctrl) {
				var showCurDay = scope.showcurday;
				var addDays=attrs.adddays;
				var editable=attrs.editable === "false" ? false : true;
				var options = {
					editable : editable
				};
				var inRun = false;
				options['onChange'] = function(date) {
					inRun = true;
					ctrl.$setViewValue(date);
					inRun = false;
				};
				var db = element.datebox(options);
				$rootScope.dateboxs.push(db);
				
				 /**
                   * 监听参数值变化
                   */
                scope.$watch('showcurday',function (newVal, oldVal) {
  				    if (newVal != oldVal) {
  				    	showCurDay = scope.showcurday;
  				    	if((typeof(ctrl.$viewValue) == "undefined" || ctrl.$viewValue==null || ctrl.$viewValue=="") && (showCurDay == "true" || showCurDay == true )){
							var date = new Date();
							if(addDays && addDays != ''){
								var day = date.getDate();
								var dayTime = Number(day) + Number(addDays);
								date.setDate(dayTime);
							}
				       		element.datebox('setValue', $rootScope.formatDate(date));
						}else{
							if(ctrl.$viewValue!=null && ctrl.$viewValue!=""){
								element.datebox('setValue', $rootScope.getDateObject(ctrl.$viewValue));
							}
							
						}
  				    }
  				}, true);
  				

				ctrl.$render = function() {
					if(inRun) return;

					if((typeof(ctrl.$viewValue) == "undefined" || ctrl.$viewValue==null || ctrl.$viewValue=="") && (showCurDay == "true" || showCurDay == true )){
						var date = new Date();
						if(addDays && addDays != ''){
							var day = date.getDate();
							var dayTime = Number(day) + Number(addDays);
							date.setDate(dayTime);
						}
			       		element.datebox('setValue', $rootScope.formatDate(date));
					}else{
						if(ctrl.$viewValue!=null && ctrl.$viewValue!=""){
							element.datebox('setValue', $rootScope.getDateObject(ctrl.$viewValue));
						}
						
					}
				};
			}
		};
	}]);
	
}(window, angular));
(function() {
	document.createElement('hide-Novalidate');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.hidenovalidate', [])
	.directive('hideNovalidate', function() {
		return {
			require: ['ngModel','^form'],
			restrict : 'A',
			link : function(scope, element, attrs, ctrls) {
				var modelCtrl = ctrls[0];
				var formCtrl = ctrls[1];
				if (!formCtrl) return;

				scope.$watch(function getDisplay() {
					return scope.$eval(attrs.hideNovalidate);
				},function ngShowWatch(val) {
			        if (!val) {
			        	//控件隐藏,从表单控制器中删除
						formCtrl.$removeControl(modelCtrl);
			        }else{
			        	//控件显示,添加到表单控制器,并根据控件验证状态修改表单表单验证状态
			        	formCtrl.$addControl(modelCtrl);
						angular.forEach(modelCtrl.$error, function(validity, validationKey) {
							formCtrl.$setValidity(validationKey, !validity, modelCtrl);
						});
			        }
				});
			}
		};
	});
}(window, angular));
;
/**
 * IE8兼容问题
 */
(function() {
	document.createElement('ng-include');
	document.createElement('ng:include');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.include', [])
	.directive('agInclude', ['$http', '$templateCache', '$anchorScroll', '$animate', '$sce', 
		function($http,$templateCache,$anchorScroll,$animate,$sce) {
		    return {
			    restrict: 'ECA',
			    priority: 400,
			    terminal: true,
			    transclude: 'element',
			    controller: angular.noop,
			    compile: function(element, attr) {
			      	var srcExp = attr.ngInclude || attr.src,
			          	onloadExp = attr.onload || '',
			          	autoScrollExp = attr.autoscroll;

			      	return function(scope, $element, $attr, ctrl, $transclude) {
				        var changeCounter = 0,
				            currentScope,
				            previousElement,
				            currentElement;

			        	var cleanupLastIncludeContent = function() {
					        if(previousElement) {
					            previousElement.remove();
					            previousElement = null;
					        }
					        if(currentScope) {
					            currentScope.$destroy();
					            currentScope = null;
					        }
					        if(currentElement) {
					            $animate.leave(currentElement, function() {
					              previousElement = null;
					            });
					            previousElement = currentElement;
					            currentElement = null;
					        }
			        	};

				        scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {
					        var afterAnimation = function() {
					            if (autoScrollExp && (!autoScrollExp || scope.$eval(autoScrollExp))) {
					              $anchorScroll();
					            }
					        };
					        var thisChangeId = ++changeCounter;
					        if (src) {
					            $http.get(src, {cache: $templateCache}).success(function(response) {
						            if (thisChangeId !== changeCounter) return;
						            var newScope = scope.$new();
						            ctrl.template = response;

						            var clone = $transclude(newScope, function(clone) {
						                cleanupLastIncludeContent();
						                $animate.enter(clone, null, $element, afterAnimation);
						            });

						            currentScope = newScope;
						            currentElement = clone;

						            currentScope.$emit('$includeContentLoaded');
						            scope.$eval(onloadExp);
					            }).error(function() {
					              	if (thisChangeId === changeCounter) cleanupLastIncludeContent();
					            });
					            scope.$emit('$includeContentRequested');
					        } else {
					            cleanupLastIncludeContent();
					            ctrl.template = null;
					        }
				        });
			      	};
			    }
			};
		}]
	)
	.directive('agInclude', 
		['$compile', '$sce', function($compile, $sce) {
		    return {
		      	restrict: 'ECA',
		      	priority: -400,
		      	require: 'agInclude',
		      	link: function(scope, $element, $attr, ctrl) {
		      		scope.totalCart = function() {
					    return $attr.show;
					};
		      		scope.$watch(scope.totalCart, function(){
						if($attr.show && $attr.show=='true'){
							if($element.context.innerText.length<=0){
								$element.html(ctrl.template);
			        			$compile($element.contents())(scope);
							}
			      		}
					});
		      	}
		    };
		}]
	);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.tabs', [])
	.factory('$ui_tabs', ["$rootScope", function($rootScope) {
		var $ui_tabs = {
			/**
			 * tab选项卡管理
			 */
			tabs : {},
			/**
			 * 菜单选项卡管理
			 */
			menuClass : {},

			/**
			 * 初始化tabs
			 */
			iniTab : function(tabName, tabItemNames, className){
				className = className ? className : 'selected';
				$rootScope.tabs[tabName] = {};
				$rootScope.tabs[tabName].className = className;
				$rootScope.tabs[tabName].tabShow = {};
				$rootScope.tabs[tabName].tabClass = {};
				
				if(tabItemNames){
					var tNames = tabItemNames.split(",");
					tNames.forEach(function(item){
						$rootScope.tabs[tabName].tabShow[item] = true;
						$rootScope.tabs[tabName].tabClass[item] = className;
					});
				}
			},

			/**
			 * 设置tabs的显示
			 */
			setTab : function(tabName, itemName){
				var items = itemName.split(',');
				if(!$rootScope.tabs[tabName]){
					if(items.length>=1){
						$rootScope.iniTab(tabName, items[0]);
					}else{
						$rootScope.iniTab(tabName, items);
					}
				}
				if(items.length>1){
					items.forEach(function(e){
						$rootScope.tabs[tabName].tabShow[e] = !$rootScope.tabs[tabName].tabShow[e];
						if($rootScope.tabs[tabName].tabShow[e]){
							$rootScope.tabs[tabName].tabClass[e] = $rootScope.tabs[tabName].className;
						}else{
							$rootScope.tabs[tabName].tabClass[e] = "";
						}
					});
				}else{
					for(attribute in $rootScope.tabs[tabName].tabShow){
						$rootScope.tabs[tabName].tabShow[attribute] = false;
						$rootScope.tabs[tabName].tabClass[attribute] = "";
					}
					$rootScope.tabs[tabName].tabShow[itemName] = true;
					$rootScope.tabs[tabName].tabClass[itemName] = $rootScope.tabs[tabName].className;
				}
				return true;
			},
			
			/**
			 * 初始化menuClass
			 */
			initMenuClass : function(classname){
				classname = classname ? classname : 'selected';
				//设置或获取对象指定的文件名或路径。
				var menu = window.location.pathname;
				$rootScope.menuClass[menu] = classname;
			}
		};
		for(f in $ui_tabs){
			$rootScope[f] = $ui_tabs[f];
		}
		return $ui_tabs;
	}])
	.run(["$rootScope", "$ui_tabs", function($rootScope, $ui_tabs) { }]);
}(window, angular));
(function() {
	document.createElement('ag-Textarea');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.textarea', [])
	.directive('agTextarea', function() {
		return {
			replace : true,
			restrict : 'E',
			template : "<textarea></textarea>",
			require : "ngModel",
			link : function(scope, element, attrs, ctrl) {
				var name = attrs['name'];
				var elementName = "textarea[name='" + name + "']";
				var editor = null;
				KindEditor.ready(function(K) {
					editor = K.create(elementName, {
						uploadJson : getBasePath() + '/kindeditor/upload.do',
						fileManagerJson : getBasePath() + '/kindeditor/fileManager.do',
						allowFileManager : true,
						afterChange : function() {
							scope.$apply(function() {
								ctrl.$setViewValue(editor.html());
							});
						}
					});
				});

				ctrl.$render = function() {
				    if(!editor)
				      return;
					if (ctrl.$viewValue == null) {
						editor.html('');
					} else {
						editor.html(ctrl.$viewValue);
					}
				};
			}
		};
	});
	
}(window, angular));
(function() {
	document.createElement('ag-Window');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.window', [])
	.factory('$ui_window', ["$rootScope", function($rootScope) {
		var $ui_window = {

			cOpenWN : '',

			// 打开窗口
			openWindow : function(wn){
				wn = wn ? wn : 'edit';
				$('#'+wn).window('open');
				$('#'+wn).window('center');
				$rootScope.cOpenWN = wn;
			},
			
			// 关闭窗口
			closeWindow : function(wn){
				wn = wn ? wn : $rootScope.cOpenWN;
				$('#'+wn).window('close');
			},

			// 保存成功后，关闭当前容器
			saveCloseWindow : function(){
				$rootScope.closeWindow();
			}
		};
		for(f in $ui_window){
			$rootScope[f] = $ui_window[f];
		}
		return $ui_window;
	}])
	.directive('agWindow', ["$document", "$rootScope", function($document, $rootScope) {
	    return function(scope, element, attrs) {
	        var title = "编辑";
			if(attrs.title){
				title = attrs.title;
			}

			var width = 800;
			if(attrs.width){
				width = parseInt(attrs.width);
			}

			var height = 400;
			if(attrs.height){
				height = parseInt(attrs.height);
			}

			var pw = $(element).window({
				iconCls:'icon-edit',
				collapsible: false,
				minimizable: false,
				maximizable: false,
				resizable: false,
				modal:true,
				closed:true,
				shadow:true,
			    title: title,
			    width: width,
			    height: height
			});
			$rootScope.windows.push(pw);
	    };
	}])
	.run(["$rootScope", "$ui_window", function($rootScope, $ui_window) { }]);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.easyui.base', ['ui.datebox','ui.hidenovalidate','ui.include','ui.tabs','ui.textarea','ui.window']);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.as.chinese.bool', [])
	.filter("asChineseBool", ['$rootScope', function ($rootScope) {
   		 return function (input) {
   		 	if(input==true || input=='true' || input=='TRUE'){
   		 		return '是';
   		 	}else{
   		 		return '否';
   		 	}
   		 };
	}]);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.as.chinesedate', [])
	.filter("asChineseDate", ['$rootScope', function ($rootScope) {
   		 return function (input) {
        	return $rootScope.getChineseDateObject(input);
   		 };
	}])
	.filter("asChineseTime", ['$rootScope', function ($rootScope) {
   		 return function (input) {
        	return $rootScope.getChineseTimeObject(input);
   		 };
	}]);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.as.date', [])
	.filter("asDate", ['$rootScope', function ($rootScope) {
	    return function (input) {
	    	return $rootScope.getDateObject(input);
	    };
	}]);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.as.length', [])
	.filter("asLength", function () {
	    return function (input, maxLength) {
	    	if(input==null || input==""){
	    		return "";
	    	}
	    	if(input.length<=maxLength){
	    		return input;
	    	}else{
	    		input = input.substring(0, maxLength-3) + "...";
	    		return input;
	    	}
	    };
	});
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.as.empty',[])
	.filter("asEmpty",["input", function(input){
		return function (input) {
			if(typeof(input) == "undefined" || input==null || input=="null"){
	    		return "";
	    	}else{
	    		return input;
	    	}
	    };
	}]);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.easyui.extend', ['ui.as.chinese.bool','ui.as.chinesedate','ui.as.date','ui.as.length','ui.as.empty']);
}(window, angular));
// 定义树型表初始化接口
(function(window, angular, undefined){
	angular.module('ui.combo', [])
	.factory('$ui_combo', ["$rootScope", function($rootScope) {
		var $ui_combo = {
			
			// 初始化
			comboInit : function(fn,para,ds){
				if(!fn){
					return false;
				}
				// 默认树型表单参数
				var defaultComboPara = {
					// 父ID
					pidField:'',
					// 表与表之间的外键
			       	foreignField:'',
			        // id字段
			        valueField:'id',
			       	// 显示字段
			       	textField:'display',
			       	// 是否最后一级字段
			       	leafField:'',
			       	// 是否多选
			       	multiple:false,
			       	// 是否可编辑
			       	editable:false,
			       	// 是否添加空行
			       	addSpace:false,
			       	// 是否加载数据
			       	isLoaded:false,
			       	// 下个表单名称
			       	nfn:'',
			       	// 上个表单名称
			       	pfn:'',
			       	// 是否计算总记录数
			       	computeRowCounts:false,
			       	// 页面大小
			       	pageSize:1000,
			       	// 是否只能选择最后级别
			       	onlySelectLeaf:false,
			       	// 树是否显示checkbox
			       	checkbox : true,
			       	// 树是否只有子节点显示checkbox
					onlyLeafCheck : false,
					// 树是否直接初始化数据
					initTree : true,
					// 树型选中与绑定值的关联字段
					bindField:null,
					// 树型选中与绑定值的表单名称
					bindFn:null,
					// 是否使用字典模式
					uDictionary:false,
					// 字典的名称，如果使用字典模式
					dictionary:null,
					// 显示字典中的无效值
					showDicNoValidValue:false,
					// 默认的字典PID值
					pDicId:'0',
					// 数据字典情况下,初始加载级数
					intLoadLevel:1,
					// 是否在下拉框架显示code值
					showCode : false,
					// 是否将下拉框架的请选择的值nullitem转换为'',用于查询时需将此参数设计为false
					superNullItem : true,
					// 树查询过滤值
					filterValue:null
				};

				var afPara = jQuery.extend(false, defaultComboPara, para);
				if(afPara.queryFields==null || afPara.queryFields==''){
					afPara.queryFields = afPara.valueField+','+afPara.textField;
					if(afPara.pidField!=null && afPara.pidField!=''){
						afPara.queryFields += ','+afPara.pidField;
					}
					if(afPara.leafField!=null && afPara.leafField!=''){
						afPara.queryFields += ','+afPara.leafField;
					}
				}
				if(afPara.queryFields==='*'){
					afPara.queryFields='';
				}
				afPara.nfn = afPara.nfn == null ? '' : afPara.nfn;
				afPara.pfn = afPara.pfn == null ? '' : afPara.pfn;

				if(afPara.nfn!='' || afPara.pfn!=''){
					afPara.multiple = false; // 有下拉联动时，不可多选
					afPara.addSpace = true;  // 有下拉联动时，需添加空行
				}
				if(afPara.multiple){
					afPara.addSpace = false; // 多选时，强制不添加空行
				}

				return $rootScope.formInit(fn,afPara,ds);
			},

			setValue : function(scope,valueString,value){
				var binder = $rootScope.getBinder(scope,valueString);
				if (binder != null && binder.obj != null) {
					binder.obj[binder.field] = value;
				}
			},

			getValue : function(scope,valueString){
				var binder = $rootScope.getBinder(scope,valueString);
				if (binder != null && binder.obj != null && binder.obj[binder.field]!=null) {
					return binder.obj[binder.field];
				} else {
					return "";
				}
			},

			getSpaceRow : function(fn){
				var fo = $rootScope[fn];
				if(fo.leafField!=null && fo.leafField!=''){
					var spaceJson = "({'"+fo.valueField+"':'nullItem','"+fo.textField+"':'<请选择>','"+fo.leafField+"':1})";
					return eval(spaceJson);
				}else{
					var spaceJson = "({'"+fo.valueField+"':'nullItem','"+fo.textField+"':'<请选择>'})";
					return eval(spaceJson);
				}
			},

			getDefaultRow : function(fn,value,text){
				var fo = $rootScope[fn];
				var tempJson = "({'"+fo.valueField+"':'"+value+"','"+fo.textField+"':'"+text+"'})";
				return eval(tempJson);
			},

			canLoad : function(fn,scope){
				var fo = $rootScope[fn];
				if(fo.isLoaded){
					return false;
				} else {
					if(fo.pfn && fo.pfn!=null && fo.pfn!=''){
						var pvalue = $ui_combo.getValue(scope,$rootScope[fo.pfn].ngModel);
						pvalue = pvalue ? pvalue : '';
						if(pvalue!='' && pvalue!='nullItem'){
							return true;
						}else{
							return false;
						}
					}else{
						return true;
					}
				}
			},

			//获取下拉多选值
			getValues : function(values) {
				if (values) {
					if (values.length < 2) {
						//如果多选值只有一个或者没有，将数组改为字符串
						values = values[0] || '';
					}else{
						//当选择多个时去除选择中的空值
						for (var i = 0; i < values.length; i++) {
							if(values[i] == ''){
								values.remove(values[i]);
							}
						};
						//转换为字符串
						values = values.join();
					}
				};
				return values;
			},

			setNextQuery : function(fn,scope){
				var _nfn = $rootScope[fn].nfn;
				if(_nfn && _nfn!=null && _nfn!=''){
					var nfns = _nfn.split(",");
					var pvalue = $ui_combo.getValue(scope,$rootScope[fn].ngModel);
					pvalue = pvalue ? pvalue : '';
					if(pvalue=='nullItem'){
						pvalue='';
					}

					nfns.forEach(function(nfn){
						var onfn = $rootScope[nfn];
						var foreignkey=pvalue;
						//支持下一级别控件，自定义查询条件
						if(onfn.foreignfun){
							foreignkey=$rootScope[onfn.foreignfun](fn,onfn,foreignkey);
						}
						if(onfn.foreignField==null || onfn.foreignField==''){
							if(onfn.uDictionary){
								onfn.pDicId = foreignkey;
							} else {
								onfn.queryObject[onfn.pidField] = foreignkey;
							}
						}else{
							onfn.queryObject[onfn.foreignField] = foreignkey;
						}
					});
				}
			},

			clearNext : function(fn,scope,cv){
				var _nfn = $rootScope[fn].nfn;
				if(_nfn && _nfn!=null && _nfn!=''){
					var nfns = _nfn.split(",");
					nfns.forEach(function(nfn){
						var onfn = $rootScope[nfn];
						onfn.data=[];
						if(onfn.isTree){
							onfn.element.combotree('loadData', []);
							onfn.element.combotree('setValue', '');
						}else{
							onfn.element.combobox('loadData', []);
							onfn.element.combobox('setValue', '');
						}
						if(cv){
							$ui_combo.setValue(scope,onfn.textValue,'');
							$ui_combo.setValue(scope,onfn.ngModel,'');
						}
						onfn.isLoaded = false;

						$ui_combo.clearNext(nfn,scope);
					});
				}
			},

			toTreeData : function(fn,data){
				var fo = $rootScope[fn];
				var toItem = function(e){
					if(fo.valueField!='id'){
						e.id = e[fo.valueField];
					}

					if(fo.textField!='text'){
						e.text = e[fo.textField];
					}

					if(fo.showCode && e.text!=e.id){
						e.text += "("+e.id+")";
					}

					if(fo.leafField==null || fo.leafField==''){
						// 没有配置子节点字段的，默认全部为子节点
						e.state = 'open';
					}else{
						if(e[fo.leafField]==true){
							e.state = 'open';
						}else{
							e.state = 'closed';
						}
					}
				}

				var toItems = function(es){
					es.forEach(function(e){
						toItem(e);
						var children = e.children;
						if(children && children.length>0){
							toItems(children);
						}
					});
				}

				toItems(data);
			},

			toBoxData : function(fn,data){
				var fo = $rootScope[fn];
				if(fo.showCode){
					data.forEach(function(e){
						if(e[fo.textField]!=e[fo.valueField]){
							e[fo.textField] += "("+e[fo.valueField]+")";
						}
					});
				}
			},

			// 数据值过滤
	        comboFilter : function(fn){
	            var fo = $rootScope[fn];
	            if(!fo.rootDatas){
	                fo.rootDatas = fo.element.tree('getRoots');
	            }
	            var datas = fo.rootDatas;

	            var getChildren = function(e,filterValue){
	            	if(!e.children || e.children.length<=0) return null;
	            	var filterChildren = [];
	            	e.children.forEach(function(c){
	            		var cc = getChildren(c,filterValue);
	            		if(cc==null){
	            			if(c.text.indexOf(filterValue)!=-1){
	                            filterChildren.push({id:c.id,text:c.text,state:c.state,checked:c.checked,attributes:c.attributes,children:[]});
	                        }
	            		}else{
	                        filterChildren.push({id:c.id,text:c.text,state:c.state,checked:c.checked,attributes:c.attributes,children:cc});
	            		}
                    });
                    if(filterChildren.length<=0) return null;
                    return filterChildren;
	            };

	            var newDatas = [];
	            datas.forEach(function(e){
	            	var cc = getChildren(e,fo.filterValue);
	            	if(cc==null){
            			if(e.text.indexOf(fo.filterValue)!=-1){
                            newDatas.push({id:e.id,text:e.text,state:e.state,checked:e.checked,attributes:e.attributes,children:[]});
                        }
            		}else{
                        newDatas.push({id:e.id,text:e.text,state:e.state,checked:e.checked,attributes:e.attributes,children:cc});
            		}
	            });
	            fo.element.tree('loadData', newDatas);
	        }
		};
		for(f in $ui_combo){
			$rootScope[f] = $ui_combo[f];
		}
		return $ui_combo;
	}])
	.run(["$rootScope", "$ui_combo", function($rootScope, $ui_combo) { }]);
}(window, angular));
(function() {
	document.createElement('ag-Combobox');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.combobox', ['ui.combo'])
	.directive('agCombobox', ["$rootScope", "$ui_combo", function($rootScope, $ui_combo) {
		return {
			replace : true,
			restrict : 'E',
			require : "ngModel",
			template : '<select class="fore-common-select" ></select>',
			scope : {
				textValue : "@",
				unitValue : "@",
				ngModel : "@"
			},
			link : function(scope, element, attrs, ctrl) {
				var fn = attrs.fn ? attrs.fn : $rootScope.getGUID();
				$ui_combo.comboInit(fn,eval("("+attrs.para+")"));
				var cf = $rootScope[fn];
				cf.textValue = scope.textValue ? scope.textValue : '';
				cf.unitValue = scope.unitValue ? scope.unitValue : '';
				cf.ngModel = scope.ngModel ? scope.ngModel : '';
				var isRender = false;

				var options = {
					editable : cf.editable,
					valueField : cf.valueField,
					textField : cf.textField,
					multiple : cf.multiple
				};

				var loadFun = function(data){
					cf.isLoaded = true;
					data = data ? data : [];
					if(cf.addSpace){
						data.unshift($ui_combo.getSpaceRow(fn));
					}
					isRender=true;
					$rootScope.toBoxData(fn,data);
					element.combobox('loadData', data);
					isRender=false;
				};

				// 展示时，再加载数据
				options.onShowPanel = function () {
					if ($ui_combo.canLoad(fn,scope)) {
						if(cf.uDictionary){
							$rootScope.getDictionaryChilds(cf.dictionary,cf.pDicId,cf.showDicNoValidValue,
								function(data){
									loadFun(data);
								}, 
								function(){}
							);
						}else{
							$rootScope.loadData(fn,function(fName,data){
								loadFun(data);
							});
						}
					};
				};

				// 选中
				options.onSelect = function(record) {
					if(isRender){
						return;
					}

					if(cf.multiple){
						var values = element.combobox('getValues');
						values.push(record[cf.valueField]);
						values=$ui_combo.getValues(values);
						ctrl.$setViewValue(values);
						if(attrs.onSelect){
							$rootScope[attrs.onSelect](record);
						}
					}else{
						var values = [];
						if(cf.superNullItem){
							if(record[cf.valueField]!='nullItem'){
								values.push(record[cf.valueField]);
							}
						}else{
							values.push(record[cf.valueField]);
						}
						values=$ui_combo.getValues(values);
						ctrl.$setViewValue(values);

						$ui_combo.setNextQuery(fn,scope);
						$ui_combo.clearNext(fn,scope,true);
						cf.selectedRow=$.extend(true,{},record);
						if(attrs.onSelect){
							$rootScope[attrs.onSelect](record);
						}
					}
				};

				// 取消选中
				options.onUnselect = function(record) {
					if(cf.multiple){
						var values = element.combobox('getValues');
						values.removeByValue(record[cf.valueField]);
						values=$ui_combo.getValues(values);
						ctrl.$setViewValue(values);
					}
				};

				var cm = element.combobox(options);
				$rootScope.comboboxs.push(cm);
				cf.element = cm;
				cf.isTree = false;

				// 值绑定
				ctrl.$render = function() {
					if(!$rootScope[fn]) return;
					
					isRender=true;
					var value = ctrl.$viewValue ? ctrl.$viewValue : '';
					var opt = "setValue";
					if (!cf.isLoaded) {
						// 先给个临时对象，不加载远程数据，只用于显示数据
						var data = [];
						var text = $ui_combo.getValue(scope,scope.textValue);
						data.unshift($ui_combo.getDefaultRow(fn,value,text));
						element.combobox('loadData', data);
					}else{
						if (cf.multiple == true && value.indexOf(',') != -1) {
							opt = "setValues";
							value = value.split(",");
						};
					}
					element.combobox(opt, value);

					// 如果重新绑定，则清子下拉
					$ui_combo.setNextQuery(fn,scope);
					$ui_combo.clearNext(fn,scope,false);

					isRender=false;
				};
			}
		};
	}]);

}(window, angular));
(function() {
	document.createElement('ag-Combotree');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.combotree', ['ui.combo'])
	.directive('agCombotree', ["$rootScope", "$ui_combo", function($rootScope, $ui_combo) {
		return {
			replace : true,
			restrict : 'E',
			require : "ngModel",
			template : '<select></select>',
			scope : {
				textValue : "@",
				unitValue : "@",
				ngModel : "@"
			},
			link : function(scope, element, attrs, ctrl) {
				var fn = attrs.fn ? attrs.fn : $rootScope.getGUID();
				$ui_combo.comboInit(fn,eval("("+attrs.para+")"));
				var cf = $rootScope[fn];
				cf.textValue = scope.textValue ? scope.textValue : '';
				cf.unitValue = scope.unitValue ? scope.unitValue : '';
				cf.ngModel = scope.ngModel ? scope.ngModel : '';
				var bindValue = '';
				var isRender = false;

				var dataFilter = null;
				if(attrs.datafilter){
					dataFilter = $rootScope[attrs.datafilter];
				}else{
					dataFilter = $ui_combo.toTreeData;
				}

				var options = {
					editable : cf.editable,
					multiple : cf.multiple
				};

				var loadFun = function(data){
					cf.isLoaded = true;
					data = data ? data : [];
					if(cf.addSpace){
						data.unshift($ui_combo.getSpaceRow(fn));
					}
					dataFilter(fn,data);
					isRender=true;
					element.combotree('loadData', data);
					isRender=false;
					setSelect();
				};

				// 展示时，再加载数据
				options.onShowPanel = function () {
					if ($ui_combo.canLoad(fn,scope)) {
						if(cf.uDictionary){
							$rootScope.getDictionaryChildrens(cf.dictionary,cf.pDicId,cf.intLoadLevel,cf.showDicNoValidValue,
								function(data){
									loadFun(data);
								}, 
								function(){}
							);
						}else{
							$rootScope.loadData(fn,function(fName,data){
								loadFun(data);
							});
						}
					};
				};

				var loadFunEx = function(data,pTree,row){
					if (data != null && data.length > 0) {
						isRender=true;
						dataFilter(fn,data);
						pTree.tree('append', {
							parent : row.target,
							data : data
						});
						pTree.tree('collapse', row.target);
						pTree.tree('expand', row.target);
						isRender=false;
						setSelect();
					}
				};

				options.onBeforeExpand = function(row) {
					var id = row[cf.valueField];
					var pTree = element.combotree('tree');
					var nodes = [];
					try {
						nodes = pTree.tree('getChildren', row.target);
					} catch (e) { }

					if(nodes!=null && nodes.length>0){
						return;
					}

					if(cf.uDictionary){
						$rootScope.getDictionaryChilds(cf.dictionary,id,cf.showDicNoValidValue,
							function(data){
								loadFunEx(data,pTree,row);
							}, 
							function(){}
						);
					}else{
						cf.queryObject[cf.pidField] = id;
						$rootScope.loadData(fn,function(fName,data){
							loadFunEx(data,pTree,row);
						});
					}
				};

				options.onCheck = function (node,checked) {
					if (!cf.multiple){
						return;
					}
					if(isRender) return;

					var values = element.combotree('getValues');
					if (values) {
						//转换为字符串
						if (values.length < 2) {
							//如果多选值只有一个或者没有，将数组改为字符串
							values = values[0] || '';
						}else{
							values = values.join();
						}
					};
					ctrl.$setViewValue(values);
				};

				options.onSelect = function(record) {
					if (cf.multiple){
						return;
					}
					if(isRender) return;

					var value = record[cf.valueField];
					if(cf.superNullItem && value=='nullItem'){
						value='';
					}
					ctrl.$setViewValue(value);
					cf.selectedRow=$.extend(true,{},record);
					
					$ui_combo.setNextQuery(fn,scope);
					$ui_combo.clearNext(fn,scope,true);
				};
				
				options.onBeforeSelect = function(record){
					if (cf.multiple){
						return;
					}

					if (!cf.onlySelectLeaf){
						return;
					}

					var tree = $(this).tree;
					var isLeaf = tree('isLeaf', record.target);
					if(!isLeaf) {
						return false;
					}
				}

				var cm = element.combotree(options);
				$rootScope.combotrees.push(cm);
				cf.element = cm;
				cf.isTree = true;

				ctrl.$render = function() {
					if(!$rootScope[fn]) return;
					
					isRender=true;
					var value = ctrl.$viewValue ? ctrl.$viewValue : '';
					bindValue=value;
					var opt = "setValue";
					if (!cf.isLoaded) {
						setDefulat(value);
					}else{
						if (cf.multiple == true && value.indexOf(',') != -1) {
							opt = "setValues";
							value = value.split(",");
						};
						element.combotree(opt, value);
						var t = element.combotree('tree');
						if(t!=null){
							var n = t.tree('getSelected');
							// 如果要的数据，还没有加载，则再给个临时对象
							if(n==null && value!=null && value!=''){
								cf.queryObject[cf.pidField] = '';
								setDefulat(value);
							}
						}
					}

					// 如果重新绑定，则清子下拉
					$ui_combo.setNextQuery(fn,scope);
					$ui_combo.clearNext(fn,scope,false);

					isRender=false;
				};

				function setSelect(){
					isRender = true;
					if(cf.multiple){
						var vs = bindValue.split(",");
						element.combotree('setValues', vs);
					} else {
						element.combotree('setValue', bindValue);
					}
					var t = element.combotree('tree');
					var n = t.tree('getSelected');
					// 如果要的数据，还没有加载，则再给个临时对象
					if(n == null){
						element.combotree('setValue', '');
						safeApply(scope,function() {
							ctrl.$setViewValue('');
						});
					}else{
						safeApply(scope,function() {
							ctrl.$setViewValue(bindValue);
						});
					}
					isRender=false;
				}

				function setDefulat(value){
					var data = [];
					if(value!=null && value!=''){
						var text = $ui_combo.getValue(scope,scope.textValue);
						data.unshift($ui_combo.getDefaultRow(fn,value,text));
						dataFilter(fn,data);
					}
					element.combotree('loadData', data);
					element.combotree('setValue', value);
					cf.isLoaded = false;
				}

				//解决$digest already in progress
				function safeApply($scope, fn) {
				    ($scope.$$phase || $scope.$root.$$phase) ? fn() : $rootScope.$apply(fn);
				}
			}
		};
	}]);
}(window, angular));
(function () {
	document.createElement('ag-Date');
}).call(this);
(function () {
	document.createElement('ag-Time');
}).call(this);
// 当前日期控件
(function (window, angular, undefined) {
	angular.module('ui.date', [])
		.directive('agDate', ["$rootScope", function ($rootScope) {
			return {
				replace: true,
				restrict: 'E',
				require: "ngModel",
				scope: {
					canuse: "@"
				},
				link: function (scope, element, attrs, ctrl) {

					var labelId = "label_" + attrs.id;
					var templateString = "<label id='" + labelId + "'></label>";
					element.html(templateString);

					scope.$watch(function () {
						setDate();
					});

					ctrl.$render = function () {
						setDate();
					};

					function setDate() {
						if (typeof (ctrl.$viewValue) == "undefined" || ctrl.$viewValue == null || ctrl.$viewValue == "") {
							if (scope.canuse == 'true') {
								var date = new Date();
								var fmDate = $rootScope.formatDate(date);
								ctrl.$setViewValue(fmDate);
								$('#' + labelId).text(fmDate);
							} else {
								$('#' + labelId).text("");
							}
						} else {
							var fmDate = $rootScope.getDateObject(ctrl.$viewValue);
							$('#' + labelId).text(fmDate);
						}
					};
				}
			};
		}]);
}(window, angular));
// 当前日期控件
(function (window, angular, undefined) {
	angular.module('ui.time', [])
		.directive('agTime', ["$rootScope", function ($rootScope) {
			return {
				replace: true,
				restrict: 'E',
				require: "ngModel",
				scope: {
					canuse: "@"
				},
				link: function (scope, element, attrs, ctrl) {

					var labelId = "label_" + attrs.id;
					var templateString = "<label id='" + labelId + "'></label>";
					element.html(templateString);

					scope.$watch(function () {
						setDate();
					});

					ctrl.$render = function () {
						setDate();
					};

					function setDate() {
						if (typeof (ctrl.$viewValue) == "undefined" || ctrl.$viewValue == null || ctrl.$viewValue == "") {
							if (scope.canuse == 'true') {
								var date = new Date();
                                var fmDate = $rootScope.formatTime(date);
								ctrl.$setViewValue(fmDate);
								$('#' + labelId).text(fmDate);
							} else {
								$('#' + labelId).text("");
							}
						} else {
							var fmDate = $rootScope.getTimeObject(ctrl.$viewValue);
							$('#' + labelId).text(fmDate);
						}
					};
				}
			};
		}]);
}(window, angular));
(function() {
	document.createElement('ag-Dep');
}).call(this);

// 当前登录人所在部门
(function(window, angular, undefined){
	angular.module('ui.dep', [])
	.directive('agDep', ["$rootScope", function($rootScope) {
		return {
			replace : true,
			restrict : 'E',
			require : "ngModel",
			scope : {
				textValue : "@",
				canuse : "@"
			},
			link : function(scope, element, attrs, ctrl) {
				
				var labelId = "label_"+attrs.id;
				var templateString = "<label id='"+labelId+"'></label>";
				element.html(templateString);
				
				scope.$watch(function(){
					setUser();
				});
				
				ctrl.$render = function() {
					setUser();
				};
				
				function setUser() {
					if (typeof(ctrl.$viewValue) == "undefined" || ctrl.$viewValue == null || ctrl.$viewValue == "") {
						if(scope.canuse=='true'){
							//var userid = $rootScope.getCookie("deptid");
							var userid = $rootScope.curUser.departmentId;
							//var userrealname = decodeURI(escape($rootScope.getCookie("deptname")));
							var userrealname = $rootScope.curUser.departmentName;
							ctrl.$setViewValue(userid);
						
							if(userrealname!=null && userrealname!="null"){
								scope.textValue=userrealname;
								$('#'+labelId).text(userrealname);
							}
						}else{
							if(scope !=null && scope.textValue !=null && scope.textValue!=""){
								var userName = "";
								var binder = $rootScope.getBinder(scope, scope.textValue);
								if (binder != null && binder.obj != null) {
									userName = binder.obj[binder.field];
									userName = userName ? userName : '';
								}
								if(userName=="-1"){
									$('#'+labelId).text("系统管理");
								}else{
									if(userName!=""){
										$('#'+labelId).text(userName);
									}else{
										$('#'+labelId).text("");
									}
								}
							}else{
								$('#'+labelId).text("");
							}
						}
					} else {
						if(ctrl.$viewValue == "-1"){
							$('#'+labelId).text("系统管理");
						}else{
							var userName = "";
							var binder = $rootScope.getBinder(scope, scope.textValue);
							if (binder != null && binder.obj != null) {
								userName = binder.obj[binder.field];
								userName = userName ? userName : '';
							}
							if(userName=="-1"){
								$('#'+labelId).text("系统管理");
							}else{
								if(userName!=""){
									$('#'+labelId).text(userName);
								}
							}
						}
					}
				};
			}
		};
	}]);
}(window, angular));
(function() {
	document.createElement('ag-Page');
}).call(this);

// 基于控件封装 http://esimakin.github.io/twbs-pagination/
// 依赖外部文件{root}\wdpjs\WebRoot\pagination文件夹下的样式和js文件
(function(window, angular, undefined){
	angular.module('ui.page', [])
	.directive('agPage', ["$rootScope", "$compile", function($rootScope,$compile) {
	    return {
	        replace: true,
	        restrict: 'E',
	        require: "",
	        link: function(scope, element, attrs, ctrl) {
	        	var fn = attrs.fn;
	        	var pageHtml = '<ul class="zs-pagination">'+
					'<li title="首页" class="item">'+
				    '    <a ng-click="firstPage(\''+fn+'\')">首页</a>'+
				    '</li>'+
				    '<li title="上一页" class="item">'+
				    '    <a ng-click="prePage(\''+fn+'\')">上一页</a>'+
				    '</li>'+
				    '<li title="下一页" class="item">'+
				    '    <a ng-click="nextPage(\''+fn+'\')">下一页</a>'+
				    '</li>'+
				    '<li title="尾页" class="item">'+
				    '    <a ng-click="lastPage(\''+fn+'\')">尾页</a>'+
				    '</li>'+
				    '<div class="options">'+
				    '    <div title="Quick jump to page" class="quick-jumper">'+
				    '        跳至'+
				    '    	<select ng-change="setPageIndex(\''+fn+'\', '+fn+'.pageIndex);" ng-model="'+fn+'.pageIndex">'+
					'		  	<option ng-repeat="p in '+fn+'.pages" value ="{{p}}">{{p}}</option>'+
					'		</select>'+
				    '        页'+
				    '    </div>'+
				    '</div>'+
				    ' - 共<lable ng-bind="'+fn+'.rowsCount"></lable>条数据 - 第<lable ng-bind="'+fn+'.pageIndex"></lable>页 '+
				    '- 共<lable ng-bind="'+fn+'.pageCount"></lable>页'+
				'</ul>';
				
				var el = document.createElement("div");
				var showValue= fn+'.pageCount > 1';
		     	el.setAttribute("ng-show",showValue)
		       	el.innerHTML = pageHtml;
		       	$compile($(el))(scope);
		       	var pageUl=el.firstChild;
		       	element.html(el);
	        }
	    };
	}]);
}(window, angular));
(function() {
	document.createElement('ag-Tree');
}).call(this);

(function(window, angular, undefined){
	angular.module('ui.tree', ['ui.combo'])
	.directive('agTree', ["$rootScope", "$ui_combo", function($rootScope, $ui_combo) {
		return {
			replace : true,
			restrict : 'E',
			require : "ngModel",
			link : function(scope, element, attrs, ctrl) {
				var fn = attrs.fn ? attrs.fn : $rootScope.getGUID();
				$ui_combo.comboInit(fn,eval("("+attrs.para+")"));
				var isRender = false;
				// 绑定的值，为[{},{}]对象
				var bindValue = null;
				// 当前应该选中的值，为[‘’，‘’]对象
				var checkedValues = null;
				var cf = $rootScope[fn];
				// attrs.onselect 事件, attrs.oncheck 事件

				var dataFilter = null;
				if(attrs.datafilter){
					dataFilter = $rootScope[attrs.datafilter];
				}else{
					dataFilter = $ui_combo.toTreeData;
				}

				var options = {
					cascadeCheck:false,
					checkbox : cf.checkbox,
					onlyLeafCheck : cf.onlyLeafCheck
				};

				var loadFun = function(data,row){
					if (data != null && data.length > 0) {
						isRender=true;
						dataFilter(fn,data);
						data.forEach(function(e){
							//if(checkedValues.indexOf(e.id)!=-1){
								//e.checked=true;
							//}
							if(cf.initchecked!=null){
								if(e[cf.initchecked]==1 || e[cf.initchecked]==-1){
									e.checked=true;
								}
							}
						});
						element.tree('append', {
							parent : row.target,
							data : data
						});
						element.tree('collapse', row.target);
						element.tree('expand', row.target);
						if(cf.filterValue==null || cf.filterValue==''){
							cf.rootDatas = element.tree('getRoots');
						}
						isRender=false;
					}
				};

				options.onBeforeExpand = function(row) {
					if(isRender) return;
					var id = row[cf.valueField];
					var nodes = [];
					try {
						nodes = element.tree('getChildren', row.target);
					} catch (e) { }
					if(nodes!=null && nodes.length>0){
						return;
					}

					if(cf.uDictionary){
						$rootScope.getDictionaryChilds(cf.dictionary,id,cf.showDicNoValidValue,
							function(data){
								loadFun(data,row);
							}, 
							function(){}
						);
					}else{
						cf.queryObject[cf.pidField] = id;
						$rootScope.loadData(fn,function(fName,data){
							loadFun(data,row);
						});
					}
				};

				options.onCheck = function(node, checked){
					if(isRender){
						return;
					}

					var bfn = cf.bindFn;
					var bf = cf.bindField;
					var id = node.id;

					if(checked){
						checkedValues.push(id);
						// 添加对象
						if(bfn!=null && bfn!=''){
							$rootScope.addRow(bfn);
							var nr = $rootScope[bfn].editRow;
							nr[bf] = id;
							bindValue.push(nr);
						}
					}else{
						checkedValues.remove(id);
						// 移除对象
						if(bf!=null && bf!=''){
							bindValue.forEach(function(e){
								if(e[bf]==id){
									//bindValue.pop(e);
									bindValue.remove(e);
								}
							});
						}
					}
					ctrl.$setViewValue(bindValue);

					var onCheck = null;
					if(attrs.oncheck){
						onCheck = $rootScope[attrs.oncheck];
						if(onCheck){
							onCheck(node, checked);
						}
					}
				}

				options.onSelect = function(node){
					var onSelect = null;
					if(attrs.onselect){
						onSelect = $rootScope[attrs.onselect];
						if(onSelect){
							onSelect(node);
						}
					}
				}

				var loadFunEx = function(data){
					data = data ? data : [];
					dataFilter(fn,data);
					isRender=true;
					element.tree('loadData', data);
					cf.rootDatas = element.tree('getRoots');
					expandChild(cf.rootDatas, element);
					isRender=false;
				};

				var expandChild = function(nodes, element){
					if(nodes && nodes.length>0){
						nodes.forEach(function(r){
							if(r.children && r.children.length>0){
								element.tree('expand', r.target);
								expandChild(r.children, element);
							}
						});
					}
				};

				var cm = element.tree(options);
				$rootScope.trees.push(cm);
				cf.element = cm;

				
								/**
				 * 测试重新加载数据方法
				 */
				var loadTreeData=function(){
					if(cf.uDictionary){
						$rootScope.getDictionaryChildrens(cf.dictionary,cf.pDicId,cf.intLoadLevel,cf.showDicNoValidValue,
							function(data){
								loadFunEx(data);
								setloadChecked();
							}, 
							function(){}
						);
					}else{
						$rootScope.loadData(fn,function(fName,data){
							loadFunEx(data);
							setloadChecked();
						});
					}
				}
				
				cf.loadTreeData=loadTreeData;
				
				var setloadChecked=function(){
					if(!cf) return;

					isRender = true;
					bindValue = ctrl.$viewValue ? ctrl.$viewValue : '';
					checkedValues = [];

					// 清除所有选择
					var nodes = element.tree('getChecked');
					if(nodes!=null){
						nodes.forEach(function(e){
							element.tree('uncheck',e.target);
						});
					}
					if(bindValue==''){
						bindValue = [];
						isRender=false;
						return;
					}

					if(cf.bindField!=null && cf.bindField!=''){
						bindValue.forEach(function(e){
							checkedValues.push(e[cf.bindField]);
						});
					}

					if(checkedValues.length>0){
						checkedValues.forEach(function(e){
							var node = element.tree('find', e);
							if(node!=null){
								element.tree('check',node.target);
							}
						});
					}

					isRender=false;
				}

				if(cf.initTree){
					if(cf.uDictionary){
						$rootScope.getDictionaryChildrens(cf.dictionary,cf.pDicId,cf.intLoadLevel,cf.showDicNoValidValue,
							function(data){
								loadFunEx(data);
							}, 
							function(){}
						);
					}else{
						$rootScope.loadData(fn,function(fName,data){
							loadFunEx(data);
						});
					}
				}

				ctrl.$render = function() {
					setloadChecked();
				}
			}
		};
	}]);
}(window, angular));
(function() {
	document.createElement('ag-User');
}).call(this);

//
(function(window, angular, undefined){
	angular.module('ui.user', [])
	.directive('agUser', ["$rootScope", function($rootScope) {
		return {
			replace : true,
			restrict : 'E',
			require : "ngModel",
			scope : {
				textValue : "@",
				canuse : "@"
			},
			link : function(scope, element, attrs, ctrl) {
				
				var labelId = "label_"+attrs.id;
				var templateString = "<label id='"+labelId+"'></label>";
				element.html(templateString);
				
				scope.$watch(function(){
					setUser();
				});
				
				ctrl.$render = function() {
					setUser();
				};
				
				function setUser() {
					if (typeof(ctrl.$viewValue) == "undefined" || ctrl.$viewValue == null || ctrl.$viewValue == "") {
						if(scope.canuse=='true'){
							//var userid = $rootScope.getCookie("userid");
							var userid =$rootScope.curUser.userid;
							var userrealname=$rootScope.curUser.userName;
							//var userrealname = decodeURI(escape($rootScope.getCookie("username")));
							ctrl.$setViewValue(userid);
							
							if(userrealname!=null && userrealname!="null"){
								scope.textValue=userrealname;
								$('#'+labelId).text(userrealname);
							}
						}else{
							
							if(scope !=null && scope.textValue !=null && scope.textValue!=""){
								var userName = "";
								var binder = $rootScope.getBinder(scope, scope.textValue);
								if (binder != null && binder.obj != null) {
									userName = binder.obj[binder.field];
									userName = userName ? userName : '';
								}
								if(userName=="-1"){
									$('#'+labelId).text("超级管理员");
								}else{
									if(userName!=""){
										$('#'+labelId).text(userName);
									}else{
										$('#'+labelId).text("");
									}
								}
							}else{
								$('#'+labelId).text("");
							}
						}
					} else {
						if(ctrl.$viewValue == "-1"){
							$('#'+labelId).text("超级管理员");
						}else{
							var userName = "";
							var binder = $rootScope.getBinder(scope, scope.textValue);
							if (binder != null && binder.obj != null) {
								userName = binder.obj[binder.field];
								userName = userName ? userName : '';
							}
							if(userName=="-1"){
								$('#'+labelId).text("超级管理员");
							}else{
								if(userName!=""){
									$('#'+labelId).text(userName);
								}
							}
						}
					}
				};
			}
		};
	}]);
}(window, angular));
(function(window, angular, undefined){
	angular.module('ui.easyui.form', ['ui.combo','ui.combobox','ui.combotree','ui.date','ui.time','ui.dep','ui.page','ui.tree','ui.user']);
}(window, angular));
// 初始化全局变量
(function() {
	document.createElement('ng-pluralize');
	document.createElement('ng-view');
	document.createElement('ng:pluralize');
	document.createElement('ng:view');
}).call(this);

// 定义全局ui模块
(function(window, angular, undefined){
	angular.module('ui.easyui', ['ui.easyui.base','ui.easyui.extend','ui.easyui.form']);
}(window, angular));